package gameServer.model;

import java.net.Socket;
import java.util.*;

public class Player {
    //玩家id
    private int id;
    //玩家姓名
    private String name;
    //与客户端通信的socket
    private Socket socket;
    //玩家持有的poker列表
    private List<Poker> pokers = new ArrayList<>();//存放玩家持有的扑克

    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Socket getSocket() {
        return socket;
    }
    public void setSocket(Socket socket) {
        this.socket = socket;
    }
    public List<Poker> getPokers() {
        return pokers;
    }
    public void setPokers(List<Poker> pokers) {
        this.pokers = pokers;
    }

    //构造函数
    public Player(){
        super();
    }
    public Player(int id, String name, Socket socket, List<Poker> pokers) {
        super();
        this.id = id;
        this.name = name;
        this.socket = socket;
        this.pokers = pokers;
    }
    public Player(int id, String name) {
        super();
        this.id = id;
        this.name = name;
    }
    public Player(int id, String name, List<Poker> pokers) {
        super();
        this.id = id;
        this.name = name;
        this.pokers = pokers;
    }
    @Override
    public String toString(){
        return "Player [id=" + id + ", name=" + name + ", socket=" + socket + ", pokers=" + pokers + "]";
    }
}
